package datastructure.tree;

/**
 *
 * @author Lei
 */
public class IsBinaryTreeBalanced {

    public static boolean isBinaryTreeBalanced(TreeNode n) {
        if (MaxHeight.maxHeight(n) - MinHeight.minHeight(n.right) <= 1) {
            return true;
        }
        return false;
    }
}
